1. Field of the Invention
The present invention generally relates to a data transmission method and a data transmission system using the same. More particularly, the present invention is concerned with a data transmission which is executed when data stored in an input/output device (storage unit), such as a magnetic disc unit is renewed or updated.
2. Description of the Related Art
There is known a database system which has an input/output device, such as a large-capacity magnetic disc unit. It is necessary to refer to or renew data in the input/output device in real time when a terminal or an external computer system generates a data read/write or renewal request. In such a database system, it is necessary to prevent data in the input/output device from being destroyed due to the occurrence of a hardware fault in a central processing unit or other structural elements in the database system.
A conventional database system has a historical log file, which stores information about the status of a currently executed process which indicates that data is being renewed and which stores data indicating the area which is to be accessed. The historical log file also has renewed data itself. In a case where data in the input/output device is renewed, the above-mentioned information and data is written into the historical log file under the control of a central processing unit in the database system. After that, the procedure for renewing data in the input/output device is started. Even if an error takes place during the renewal procedure due to a fault in the CPU and thus data is destroyed, it is possible to restore the destroyed data from the information and data stored in the historical log file. For example, the CPU refers to the historical log file and obtains data which is subjected to the renewal procedure from the historical log file. Then, the CPU executes the same renewal procedure again.
Generally, data is written into the input/output device in a predetermined data unit, called a physical block. Even when data to be renewed amounts to a few bytes, the entire physical block containing the above data is read out from the input/output device and the related data contained in the entire physical block is renewed. Then, the entire physical block containing the renewed data is written into the input/output device.
The above-mentioned conventional procedure will be further described with reference to FIG. 1. Portion (A) of FIG. 1 illustrates the status of the input/output device obtained before the renewal procedure is carried out. Generally, a data base which is composed of a plurality of physical blocks is stored in an input/output device 1. The input/output device 1 has a physical block 1a which is one of the plurality of physical blocks. The physical block 1a is written into a main storage unit (MSU) 2 managed by a CPU (not shown), and a (hatched) portion of the physical block 1a to be renewed is replaced by renewal data 2a (FIG.1-(B)). The physical block 1a having the renewal data 2a is written into the input/output device 1 again, and recognized to be a new physical block 1a' (FIG.1-(c)). The renewal procedure is carried out in physical block units. For this reason, even if data to be renewed is equal to a few bytes, it is necessary to read out the entire physical block containing the above data and then replace the data with renewal data and write the entire physical block containing the renewal data into the input/output device.
It is known to use an input/output adapter which is provided between the main storage unit MSU managed by the CPU and the input/output device which is of, for example, a disc drive unit. A data transfer between the MSU and the input/output adapter is carried at the same time as a data transfer between the input/output adapter and the input/output device.
This procedure will be described with reference to FIG. 2. The MSU 2 shown in (A) of FIG. 2 stores a physical block 10 which has been renewed. The physical block 10 has an area 10a which has been transferred to the input/output device 1, an area 10b which has been transferred to an input/output adapter (ADP) 3, and an area 10c which has not yet been read out from the MSU 2. When a predetermined amount of data is transferred from the MSU 2 to a data buffer 3a built in the input/output adapter 3, the data being considered is transferred to the input/output device 1 in a first-in first-out (FIFO) process, starting from the beginning of the received data. The input/output adapter 3 drives a bus 4 provided between the MSU 2 and the input/output adapter 3, and an input/output bus 5 between the input/output adapter 3 and the input/output device 1 at the same time. Thus, it is possible to reduce the time it takes to renew data. In addition, it is unnecessary to form the data buffer 3a of a large capacity memory means.
However, the renewal procedure shown in FIG.2 has the following disadvantages. When a fault occurs in the CPU, MSU 2, bus 4 or the like during data transfer, the procedure for transferring data from the input/output adapter 3 to the input/output device 1 is stopped. In this case, data on the side of the input/output device 1 is not renewed completely so that data may be damaged. A case will be considered where the data transfer operation between the input/output adapter 3 and the input/output device 1 is stopped while the input/output device 1 is inputting data from the input/output adapter 3. In this case, special data (binary "0", for example) is written into the data in place of data which is not output by the input/output adapter 3. This is due to the fact that an error check code must be processed in the physical block unit. The above-mentioned procedure is called padding and is well known in the field of magnetic disc units.
In order to realize the padding process, it is necessary to store the entire physical block in the historical log file. For example, it is necessary to store the entire physical block (consisting of hundreds to thousands of bytes) even if data to be renewed is equal to one byte. In addition, the historical log file must be referred to without exception before data in the input/output device 1 is renewed. After all necessary data and information in the historical log file are renewed, data in the input/output device 1 is renewed. Thus, an increase in the amount of data stored in the historical log file increases the time it takes to renew data as well as the time it takes to respond to a request output by a terminal coupled to the database system being considered. Furthermore, a large-capacity storage device is required when the data amount to be processed is great.